This is the readme file for data and code of the paper "Crashes, Volatility, and the Equity
Premium: Lessons from S&P500 Options" by Pedro Santa-Clara and Shu Yan. Review of Economics 
and Statistics, 2010, 92(2), 435-451.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% Data Description %%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Because the original data used in the paper are licensed, we do not have the authority to post them. 
But many institutions have subscriptions of these data sources. The following are details on
how we compile the data for the paper.

- Data period, frequency, and timing convention. We consider the period of January 1996--December 2002. 
  We choose weekly frequency and match data on Wednesday of each week. If Wednesday is not a trading day, 
  we follow the order of preference, Tuesday, Thursday, Monday, and Friday. There are a total of 366 
  trading days in this sample period. 

- S&P 500 option data are obtained from OptionMetrics. We use only contracts with maturity shorter than a 
  year and moneyness between 0.85 and 1.15. We exclude options with no trading volume and options with open 
  interest of less than 100 contracts. We use only put options. We exclude options with time to maturity 
  less than 10 days and prices less than $1/8. We exclude options that viloate no-arbitrage bounds. For 
  each contract, we use the average of the bid and ask prices as the value of the option. We end up with 
  14,416 options in our sample. 

- S&P 500 index level and its dividends are from Datastream. The interest rates are LIBOR (middle) rates, 
  also from Datastream. These data are useful for adjusting the index level by the expected future dividends 
  in order to apply the option pricing formula. Realized dividends are used as a proxy for expected dividends. 
  The dividend-adjusted stock price corresponding to the maturity of a given option is calculated by 
  subtracting the present value of the future realized dividends until the maturity of the option from the 
  current index level. Interest rates are interpolated to match the maturities of the options. The full option 
  data are only used for description purpose. 

- For estimation, we consider only four put option contracts, P1,P2,P3, and P4. P1 and P2 have the shortest 
  maturity (greater than 15 days and as close as possible to 30 days), and P3 and P4 have the second shortest 
  maturity (greater than 45 days and as close as possible to 60 days). P1 and P3 are closest to at-the-money, 
  and P2 and P4 are closest to moneyness (S/K) of 1.05.

- The data on 3-month T-bill rate, the commercial paper spread (difference between the rates of 3-month 
  financial commercial paper and the 3-month T-bill), and the high-yield spread (difference between the average 
  yield of the Merrill Lynch high yield corporate bond index and the yield of the 10-year Treasury bond) are 
  from Datastream. The commercial paper spread is only available since 1997.

- The file returns&options.txt contains the four option contracts that are used for model estimations. The first 
  column contains weekly stock returns of the S&P 500 index. The six columns for each option are: S, K, r, T, C, 
  sigma, where S is the ex-dividend stock price, C is the call option price and sigma is the implied volatility. 
  For put options, we use the put-call parity to transform put prices into call prices.

- The file macrovariables.txt contains the three macro economic variables: Tbill rate, commercial paper spread, and 
  high yeild spread.

- The file yzofsvsjmodel.txt contains the estimated state variables, Y and Z, for the SVSJ model.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% Program Description %%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The programs are writen and run on Matlab 7 with toolboxes in ODE, integration, etc.

- ml_price_public.m, a matlab file that contains the functions needed to compute the option price in the SVSJ model.
  You need to break the file into different matlab programs as suggested.

- ml_102_public.m, a matlab file that contains the programs for the maximum likelihood estimation of the SVSJ model.
  You need to break the file into different matlab programs as suggested.

- ml_out_public.m, a matlab file that conducts the regression analysis.
